package cmdclasses.timer;

import java.util.Calendar;
import java.util.HashMap;

import bot.CommandBot;

import commands.Timer.Binder;

public class TimerRunnable extends TimerRunnableImpl {

	private CommandBot bot;
	private String sender;
	private String channel;
	private HashMap<String, Binder> timers;

	public TimerRunnable(){}
	public TimerRunnable(CommandBot bot, Calendar time, String sender, String channel, HashMap<String, Binder> timers) {
		setUp(bot,time,sender,channel, timers);
	}
	
	public void setUp(CommandBot bot, Calendar time, String sender, String channel, HashMap<String, Binder> timers) {
		this.bot = bot;
		this.sender = sender;
		this.channel = channel;
		this.timers = timers;
	}

	@Override
	public void run() {
			bot.sendMessage(channel, sender + ", wake up!", true);
			timers.remove(sender);
	}
}
